import 'package:enterprise_v6_app/app/core/http/http.dart';
import 'package:enterprise_v6_app/app/core/utils/interface.dart';
import 'package:enterprise_v6_app/app/data/entities/application/basic_information/facility_statistics_entity.dart';
import 'package:get/get.dart';

class EquipmentFacilitiesController extends GetxController {
  FacilityStatisticsEntity statisticsEntity = FacilityStatisticsEntity();

  @override
  void onInit() {
    super.onInit();
    initStatisticsEntity();
  }

  ///初始化页面数据
  Future<void> initStatisticsEntity() async {
    final res = await HttpUtil().generateGetRequest<FacilityStatisticsEntity>(Interface.getStatistics).execute();
    res.onSuccess((result) {
      statisticsEntity = result.data!;
    });
    update();
  }
}
